package com.diudiutechnology.www.yadiudiu.yadiudiu.singlecall.MyActivity;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.diudiutechnology.www.yadiudiu.R;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/8/22.
 * 干洗订单
 */

public class ShopOrderActivity extends Activity implements View.OnClickListener {
    @Bind(R.id.retur)//返回
            LinearLayout retur;

    @Bind(R.id.shipping_layout)//配送地址
            RelativeLayout shipping_layout;

    @Bind(R.id.myaddress)//取件地址 标题
            TextView myaddress;

    Context context;
    String pos="0";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shop_order);
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        context = this;

        retur.setOnClickListener(this);
        if(getIntent()!=null){
            pos=getIntent().getStringExtra("pos");
        }
        if (pos.equals("0")){
            shipping_layout.setVisibility(View.VISIBLE);
            myaddress.setText("取件地址");
        }else {
            shipping_layout.setVisibility(View.GONE);
            myaddress.setText("我的地址");
        }

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.retur:
                finish();
                break;


        }
    }
}
